//
//  ReedBookFirstAdvViewController.m
//  WNZSSQ
//
//  Created by JDKJ on 2018/12/8.
//  Copyright © 2018年 JDKJ. All rights reserved.
//

#import "ReedBookFirstAdvViewController.h"
#import "ReadBookFirstAdvView.h"
#import <UINavigationController+FDFullscreenPopGesture.h>

@interface ReedBookFirstAdvViewController ()

@end

@implementation ReedBookFirstAdvViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //禁止全屏返回
    self.fd_interactivePopDisabled = YES;
    
    ReadBookFirstAdvView *advView = [[ReadBookFirstAdvView alloc]init];
    [self.view addSubview:advView];
    
    [advView mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.edges.mas_equalTo(self.view);
        
    }];
    
    [advView.advBtn setImage:[UIImage imageNamed:self.readModel.record.chapter%2 == 0?@"继续阅读广告图2":@"继续阅读广告图"] forState:UIControlStateNormal];
    advView.upNameLable.text = self.readModel.chapters[self.readModel.record.chapter - 1].title;
//    advView.nameLable.text = self.recordModel.chapterModel.title;
    advView.downNameLable.text = self.readModel.record.chapterModel.title;
    
    [[UIApplication sharedApplication] setStatusBarHidden:YES];
}

-(void)viewWillAppear:(BOOL)animated
{
    
    [self.navigationController setNavigationBarHidden:YES];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
